<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Nfc Interactor: NdefNfcMimeVcardRecord Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="nfcinteractor80.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nfc Interactor
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">Shows all information about NFC tags available through Qt Mobility APIs. Includes reusable convenience classes for handling additional tag types: Smart Poster, Image and vCard.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">NdefNfcMimeVcardRecord Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="NdefNfcMimeVcardRecord" -->
<p>Handles the vCard record of the MIME record type.  
 <a href="class_ndef_nfc_mime_vcard_record.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="ndefnfcmimevcardrecord_8h_source.html">ndefnfcmimevcardrecord.h</a>&gt;</code></p>

<p><a href="class_ndef_nfc_mime_vcard_record-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d955f8e1a7522dfd80a8ab04d001ef6"></a><!-- doxytag: member="NdefNfcMimeVcardRecord::Q_DECLARE_NDEF_RECORD" ref="a1d955f8e1a7522dfd80a8ab04d001ef6" args="(NdefNfcMimeVcardRecord, QNdefRecord::Mime,&quot;text/x&#45;vCard&quot;, QByteArray(0, char(0)))" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>Q_DECLARE_NDEF_RECORD</b> (<a class="el" href="class_ndef_nfc_mime_vcard_record.html">NdefNfcMimeVcardRecord</a>, QNdefRecord::Mime,&quot;text/x-vCard&quot;, QByteArray(0, char(0)))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt; QContact &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_mime_vcard_record.html#a03906d07ac54282f05021778736cc33d">contacts</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a list of all the contacts contained in the vCard record.  <a href="#a03906d07ac54282f05021778736cc33d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_mime_vcard_record.html#ad8d93c3cb178b6d7649cc5ff169a0ad5">setContact</a> (const QContact &amp;contacts, QVersitDocument::VersitType versitType=QVersitDocument::VCard30Type)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function if only one contact should be stored in the message.  <a href="#ad8d93c3cb178b6d7649cc5ff169a0ad5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_mime_vcard_record.html#a07893ee05e43ea51721568f36ff5c945">setContact</a> (const QList&lt; QContact &gt; contacts, QVersitDocument::VersitType versitType=QVersitDocument::VCard30Type)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Store the list of contacts into the payload of the vCard record.  <a href="#a07893ee05e43ea51721568f36ff5c945"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d3ebb98e7df47653845e09ee61788bb"></a><!-- doxytag: member="NdefNfcMimeVcardRecord::error" ref="a5d3ebb98e7df47653845e09ee61788bb" args="()" -->
QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_mime_vcard_record.html#a5d3ebb98e7df47653845e09ee61788bb">error</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the error message in case there was a problem parsing the record into a QContact or assembling the payload. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Handles the vCard record of the MIME record type. </p>
<p>The contents of the vCard are parsed using Qt Mobility APIs. You can then further use the returned QContact(s) to store them in the address book of the user.</p>
<p>In case there is an issue parsing the vCard or serializing a QContact to a vCard, you can retrieve the error message through the <a class="el" href="class_ndef_nfc_mime_vcard_record.html#a5d3ebb98e7df47653845e09ee61788bb" title="Returns the error message in case there was a problem parsing the record into a QContact or assemblin...">error()</a> method.</p>
<dl class="version"><dt><b>Version:</b></dt><dd>1.0.0 </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a03906d07ac54282f05021778736cc33d"></a><!-- doxytag: member="NdefNfcMimeVcardRecord::contacts" ref="a03906d07ac54282f05021778736cc33d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QList&lt; QContact &gt; NdefNfcMimeVcardRecord::contacts </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a list of all the contacts contained in the vCard record. </p>
<p>In case the contents of the payload can not be parsed into valid QContact instances, an empty list is returned. You can then retrieve the error message through <a class="el" href="class_ndef_nfc_mime_vcard_record.html#a5d3ebb98e7df47653845e09ee61788bb" title="Returns the error message in case there was a problem parsing the record into a QContact or assemblin...">error()</a>. </p>

</div>
</div>
<a class="anchor" id="ad8d93c3cb178b6d7649cc5ff169a0ad5"></a><!-- doxytag: member="NdefNfcMimeVcardRecord::setContact" ref="ad8d93c3cb178b6d7649cc5ff169a0ad5" args="(const QContact &amp;contacts, QVersitDocument::VersitType versitType=QVersitDocument::VCard30Type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NdefNfcMimeVcardRecord::setContact </td>
          <td>(</td>
          <td class="paramtype">const QContact &amp;&#160;</td>
          <td class="paramname"><em>contact</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QVersitDocument::VersitType&#160;</td>
          <td class="paramname"><em>versitType</em> = <code>QVersitDocument::VCard30Type</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function if only one contact should be stored in the message. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_ndef_nfc_mime_vcard_record.html#ad8d93c3cb178b6d7649cc5ff169a0ad5" title="Convenience function if only one contact should be stored in the message.">setContact()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a07893ee05e43ea51721568f36ff5c945"></a><!-- doxytag: member="NdefNfcMimeVcardRecord::setContact" ref="a07893ee05e43ea51721568f36ff5c945" args="(const QList&lt; QContact &gt; contacts, QVersitDocument::VersitType versitType=QVersitDocument::VCard30Type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NdefNfcMimeVcardRecord::setContact </td>
          <td>(</td>
          <td class="paramtype">const QList&lt; QContact &gt;&#160;</td>
          <td class="paramname"><em>contacts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QVersitDocument::VersitType&#160;</td>
          <td class="paramname"><em>versitType</em> = <code>QVersitDocument::VCard30Type</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Store the list of contacts into the payload of the vCard record. </p>
<p>In case there is an error while creating versit documents based on the QContact instances, the method will return false and you can retrieve the error message through <a class="el" href="class_ndef_nfc_mime_vcard_record.html#a5d3ebb98e7df47653845e09ee61788bb" title="Returns the error message in case there was a problem parsing the record into a QContact or assemblin...">error()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">contacts</td><td>a list of contacts to be stored as a vCard. </td></tr>
    <tr><td class="paramname">versitType</td><td>version of the versit document to be created. Defaults to v3. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the payload was successfully set. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="ndefnfcmimevcardrecord_8h_source.html">ndefnfcmimevcardrecord.h</a></li>
<li>ndefnfcmimevcardrecord.cpp</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Properties</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Mar 12 2012 13:32:48 for Nfc Interactor by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
